package com.onekbase.demo.mybatis.service;


import com.onekbase.demo.mybatis.mapper.SysConfigMapper;
import org.apache.ibatis.session.SqlSession;

public class DemoService {
    private SqlSession sqlSession;
    SysConfigMapper mapper;
    public void setSqlSession(SqlSession sqlSession) {
        this.sqlSession = sqlSession;
    }

    public void setMapper(SysConfigMapper mapper) {
        this.mapper = mapper;
    }

    public void hello(){
        System.out.println("hello from demo service");
        Object o = sqlSession.selectOne("com.onekbase.demo.mybatis.mapper.SysConfigMapper.selectConfig", "key.hello");
        System.out.println(o);
        Object oo = mapper.selectConfig("key.hello");
        System.out.println(oo);
    }
}
